using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TerritoryDesignTools._Analysis
{
    /// <summary>
    /// <para>Set Territory Level Options</para>
    /// <para>Sets options for how territory levels are created.</para>
    /// <para>设置区域级别的创建方式选项。</para>
    /// </summary>    
    [DisplayName("Set Territory Level Options")]
    public class SetTerritoryLevelOptions : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SetTerritoryLevelOptions()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_territory_solution">
        /// <para>Input Territory Solution</para>
        /// <para>The Territory Design solution layer that will be used in the analysis.</para>
        /// <para>将在分析中使用的 Territory Design 解决方案图层。</para>
        /// </param>
        /// <param name="_level">
        /// <para>Level</para>
        /// <para>The level to which the options will be applied.</para>
        /// <para>将应用选项的级别。</para>
        /// </param>
        public SetTerritoryLevelOptions(object _in_territory_solution, object _level)
        {
            this._in_territory_solution = _in_territory_solution;
            this._level = _level;
        }
        public override string ToolboxName => "Territory Design Tools";

        public override string ToolName => "Set Territory Level Options";

        public override string CallName => "td.SetTerritoryLevelOptions";

        public override List<string> AcceptEnvironments => ["baDataSource", "workspace"];

        public override object[] ParameterInfo => [_in_territory_solution, _level, _compactness, _fill_extent.GetGPValue(), _out_territory_solution, _random_seed, _spatial_relationship.GetGPValue(), _buffer_tolerance];

        /// <summary>
        /// <para>Input Territory Solution</para>
        /// <para>The Territory Design solution layer that will be used in the analysis.</para>
        /// <para>将在分析中使用的 Territory Design 解决方案图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Territory Solution")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_territory_solution { get; set; }


        /// <summary>
        /// <para>Level</para>
        /// <para>The level to which the options will be applied.</para>
        /// <para>将应用选项的级别。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Level")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _level { get; set; }


        /// <summary>
        /// <para>Compactness</para>
        /// <para>A numeric value between 0 and 100 that defines the shape of territories.</para>
        /// <para>介于 0 和 100 之间的数值，用于定义区域的形状。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compactness")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _compactness { get; set; } = null;


        /// <summary>
        /// <para>Fill Extent Automatically</para>
        /// <para><xdoc>
        ///   <para>Specifies whether features are automatically assigned to the nearest territory.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Features are automatically assigned to the nearest territory.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Features are not automatically assigned to the nearest territory. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将要素自动指定到最近的区域。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 要素将自动指定到最近的区域。</bullet_item><para/>
        ///     <bullet_item>未选中 - 要素不会自动指定到最近的区域。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Fill Extent Automatically")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _fill_extent_value? _fill_extent { get; set; } = null;

        public enum _fill_extent_value
        {
            /// <summary>
            /// <para>AUTO_FILL_EXTENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("AUTO_FILL_EXTENT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_AUTO_FILL_EXTENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_AUTO_FILL_EXTENT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Territory Solution</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Territory Solution")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_territory_solution { get; set; }


        /// <summary>
        /// <para>Random Number Generator Seed</para>
        /// <para><xdoc>
        ///   <para>An integer used for the seed value. The default is no value and uses a random generator.
        ///   <bulletList>
        ///     <bullet_item>Uses ACM-collected algorithm 599 to produce random territories.  </bullet_item><para/>
        ///     <bullet_item>If the seed value is greater or equal to 0, the same seed value will be used to produce consistent territories.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para></para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>用于种子值的整数。默认值为 no value，使用随机生成器。
        ///   <bulletList>
        ///     <bullet_item>使用 ACM 收集的算法 599 生成随机区域。</bullet_item><para/>
        ///     <bullet_item>如果种子值大于或等于 0，则将使用相同的种子值来生成一致的区域。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para></para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Random Number Generator Seed")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _random_seed { get; set; } = null;


        /// <summary>
        /// <para>Spatial Relationship</para>
        /// <para><xdoc>
        ///   <para>Specifies the spatial relationship of how features are related to determine adjacency.</para>
        ///   <bulletList>
        ///     <bullet_item>Contiguity Edges Only—Polygon features that share a boundary or share a node with neighboring features.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要素如何关联以确定邻接关系的空间关系。</para>
        ///   <bulletList>
        ///     <bullet_item>仅邻接边 - 与相邻要素共享边界或共享节点的面要素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Spatial Relationship")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _spatial_relationship_value? _spatial_relationship { get; set; } = null;

        public enum _spatial_relationship_value
        {
            /// <summary>
            /// <para>Contiguity Edges Only</para>
            /// <para>Contiguity Edges Only—Polygon features that share a boundary or share a node with neighboring features.</para>
            /// <para>仅邻接边 - 与相邻要素共享边界或共享节点的面要素。</para>
            /// </summary>
            [Description("Contiguity Edges Only")]
            [GPEnumValue("CONTIGUITY_EDGES_ONLY")]
            _CONTIGUITY_EDGES_ONLY,

        }

        /// <summary>
        /// <para>Buffer Tolerance</para>
        /// <para>The distance between features to determine adjacency. Features that are within the buffer tolerance are considered adjacent features.</para>
        /// <para>用于确定邻接关系的要素之间的距离。在缓冲容差范围内的特征被视为相邻特征。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Buffer Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _buffer_tolerance { get; set; } = null;


        public SetTerritoryLevelOptions SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}